from django.conf.urls.defaults import *
from django.conf import settings
from django.contrib.auth.decorators import login_required

from dashboard.views import dashboard

urlpatterns = patterns('',
    url(r'^$', login_required(dashboard), name='dashboard'),
    (r'^users/', include('dashboard.urls')),
    (r'^projects/', include('projects.urls')),
    (r'^accounts/', include('registration.urls')),
)

if settings.DEBUG:
    urlpatterns += patterns('',
        (r'^(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
    )